//
//  ViewController.m
//  C11HostInfoProject
//
//  Created by 花强 on 2017/12/22.
//  Copyright © 2017年 花强. All rights reserved.
//

#import "ViewController.h"

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    // Do any additional setup after loading the view.
    
    
    NSLog(@"hahah");
    NSHost *myHost = [NSHost currentHost];
    NSLog(@"%@",[myHost name]);
    
    /*
     C11HostInfoProject[1302:7245948] dnssd_clientstub
     ConnectToServer: connect()-> No of tries: 1
     */
    
    NSHost * appress = [NSHost hostWithName:@"https://www.baidu.com"];
    NSLog(@"%@",[appress address]);
    
    //C17 test code
    NSDistributedLock * filelock = [NSDistributedLock lockWithPath:@"/hello.lck"];
    //访问资源
    
    //解除对资源的锁定
    [filelock unlock];
}


- (void)setRepresentedObject:(id)representedObject {
    [super setRepresentedObject:representedObject];

    // Update the view, if already loaded.
}


@end
